<?php

namespace app\controller;

use app\BaseController;
use think\facade\View;
use app\model\Site;
use app\utils\Custom;

class CustomPage extends BaseController
{
    static public function index($route = '') // 页面
    {
        $file = Custom::get_file($route);
        if(!$file){
            //无路由
            return View::fetch(Site::get('template') . '/404');
        }else{
            return file_get_contents(dirname(__FILE__).'/../../view/admin/CustomPage/'.$file);
        }
    }
}
